package com.whiteape.book.model.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.whiteape.book.model.bo.CategoryDetailBo;
import com.whiteape.book.model.dto.CollectionMediaBean;
import com.whiteape.book.model.dto.CollectionMediaGroupBean;
import com.whiteape.book.model.dto.DownloadTaskBean;
import com.whiteape.book.model.dto.MediaChapterBean;
import com.whiteape.book.model.dto.MediaRecordBean;
import com.whiteape.book.model.dto.ReplaceRuleBean;
import com.whiteape.book.model.dto.SiteSourceBean;
import com.whiteape.book.model.dto.SiteSourceCategoryBean;
import com.whiteape.book.model.dto.SiteSourceHomepageBean;
import com.whiteape.book.model.zssq.AuthorBean;
import com.whiteape.book.model.zssq.ReviewBookBean;

import com.whiteape.book.model.gen.CategoryDetailBoDao;
import com.whiteape.book.model.gen.CollectionMediaBeanDao;
import com.whiteape.book.model.gen.CollectionMediaGroupBeanDao;
import com.whiteape.book.model.gen.DownloadTaskBeanDao;
import com.whiteape.book.model.gen.MediaChapterBeanDao;
import com.whiteape.book.model.gen.MediaRecordBeanDao;
import com.whiteape.book.model.gen.ReplaceRuleBeanDao;
import com.whiteape.book.model.gen.SiteSourceBeanDao;
import com.whiteape.book.model.gen.SiteSourceCategoryBeanDao;
import com.whiteape.book.model.gen.SiteSourceHomepageBeanDao;
import com.whiteape.book.model.gen.AuthorBeanDao;
import com.whiteape.book.model.gen.ReviewBookBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig categoryDetailBoDaoConfig;
    private final DaoConfig collectionMediaBeanDaoConfig;
    private final DaoConfig collectionMediaGroupBeanDaoConfig;
    private final DaoConfig downloadTaskBeanDaoConfig;
    private final DaoConfig mediaChapterBeanDaoConfig;
    private final DaoConfig mediaRecordBeanDaoConfig;
    private final DaoConfig replaceRuleBeanDaoConfig;
    private final DaoConfig siteSourceBeanDaoConfig;
    private final DaoConfig siteSourceCategoryBeanDaoConfig;
    private final DaoConfig siteSourceHomepageBeanDaoConfig;
    private final DaoConfig authorBeanDaoConfig;
    private final DaoConfig reviewBookBeanDaoConfig;

    private final CategoryDetailBoDao categoryDetailBoDao;
    private final CollectionMediaBeanDao collectionMediaBeanDao;
    private final CollectionMediaGroupBeanDao collectionMediaGroupBeanDao;
    private final DownloadTaskBeanDao downloadTaskBeanDao;
    private final MediaChapterBeanDao mediaChapterBeanDao;
    private final MediaRecordBeanDao mediaRecordBeanDao;
    private final ReplaceRuleBeanDao replaceRuleBeanDao;
    private final SiteSourceBeanDao siteSourceBeanDao;
    private final SiteSourceCategoryBeanDao siteSourceCategoryBeanDao;
    private final SiteSourceHomepageBeanDao siteSourceHomepageBeanDao;
    private final AuthorBeanDao authorBeanDao;
    private final ReviewBookBeanDao reviewBookBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        categoryDetailBoDaoConfig = daoConfigMap.get(CategoryDetailBoDao.class).clone();
        categoryDetailBoDaoConfig.initIdentityScope(type);

        collectionMediaBeanDaoConfig = daoConfigMap.get(CollectionMediaBeanDao.class).clone();
        collectionMediaBeanDaoConfig.initIdentityScope(type);

        collectionMediaGroupBeanDaoConfig = daoConfigMap.get(CollectionMediaGroupBeanDao.class).clone();
        collectionMediaGroupBeanDaoConfig.initIdentityScope(type);

        downloadTaskBeanDaoConfig = daoConfigMap.get(DownloadTaskBeanDao.class).clone();
        downloadTaskBeanDaoConfig.initIdentityScope(type);

        mediaChapterBeanDaoConfig = daoConfigMap.get(MediaChapterBeanDao.class).clone();
        mediaChapterBeanDaoConfig.initIdentityScope(type);

        mediaRecordBeanDaoConfig = daoConfigMap.get(MediaRecordBeanDao.class).clone();
        mediaRecordBeanDaoConfig.initIdentityScope(type);

        replaceRuleBeanDaoConfig = daoConfigMap.get(ReplaceRuleBeanDao.class).clone();
        replaceRuleBeanDaoConfig.initIdentityScope(type);

        siteSourceBeanDaoConfig = daoConfigMap.get(SiteSourceBeanDao.class).clone();
        siteSourceBeanDaoConfig.initIdentityScope(type);

        siteSourceCategoryBeanDaoConfig = daoConfigMap.get(SiteSourceCategoryBeanDao.class).clone();
        siteSourceCategoryBeanDaoConfig.initIdentityScope(type);

        siteSourceHomepageBeanDaoConfig = daoConfigMap.get(SiteSourceHomepageBeanDao.class).clone();
        siteSourceHomepageBeanDaoConfig.initIdentityScope(type);

        authorBeanDaoConfig = daoConfigMap.get(AuthorBeanDao.class).clone();
        authorBeanDaoConfig.initIdentityScope(type);

        reviewBookBeanDaoConfig = daoConfigMap.get(ReviewBookBeanDao.class).clone();
        reviewBookBeanDaoConfig.initIdentityScope(type);

        categoryDetailBoDao = new CategoryDetailBoDao(categoryDetailBoDaoConfig, this);
        collectionMediaBeanDao = new CollectionMediaBeanDao(collectionMediaBeanDaoConfig, this);
        collectionMediaGroupBeanDao = new CollectionMediaGroupBeanDao(collectionMediaGroupBeanDaoConfig, this);
        downloadTaskBeanDao = new DownloadTaskBeanDao(downloadTaskBeanDaoConfig, this);
        mediaChapterBeanDao = new MediaChapterBeanDao(mediaChapterBeanDaoConfig, this);
        mediaRecordBeanDao = new MediaRecordBeanDao(mediaRecordBeanDaoConfig, this);
        replaceRuleBeanDao = new ReplaceRuleBeanDao(replaceRuleBeanDaoConfig, this);
        siteSourceBeanDao = new SiteSourceBeanDao(siteSourceBeanDaoConfig, this);
        siteSourceCategoryBeanDao = new SiteSourceCategoryBeanDao(siteSourceCategoryBeanDaoConfig, this);
        siteSourceHomepageBeanDao = new SiteSourceHomepageBeanDao(siteSourceHomepageBeanDaoConfig, this);
        authorBeanDao = new AuthorBeanDao(authorBeanDaoConfig, this);
        reviewBookBeanDao = new ReviewBookBeanDao(reviewBookBeanDaoConfig, this);

        registerDao(CategoryDetailBo.class, categoryDetailBoDao);
        registerDao(CollectionMediaBean.class, collectionMediaBeanDao);
        registerDao(CollectionMediaGroupBean.class, collectionMediaGroupBeanDao);
        registerDao(DownloadTaskBean.class, downloadTaskBeanDao);
        registerDao(MediaChapterBean.class, mediaChapterBeanDao);
        registerDao(MediaRecordBean.class, mediaRecordBeanDao);
        registerDao(ReplaceRuleBean.class, replaceRuleBeanDao);
        registerDao(SiteSourceBean.class, siteSourceBeanDao);
        registerDao(SiteSourceCategoryBean.class, siteSourceCategoryBeanDao);
        registerDao(SiteSourceHomepageBean.class, siteSourceHomepageBeanDao);
        registerDao(AuthorBean.class, authorBeanDao);
        registerDao(ReviewBookBean.class, reviewBookBeanDao);
    }
    
    public void clear() {
        categoryDetailBoDaoConfig.clearIdentityScope();
        collectionMediaBeanDaoConfig.clearIdentityScope();
        collectionMediaGroupBeanDaoConfig.clearIdentityScope();
        downloadTaskBeanDaoConfig.clearIdentityScope();
        mediaChapterBeanDaoConfig.clearIdentityScope();
        mediaRecordBeanDaoConfig.clearIdentityScope();
        replaceRuleBeanDaoConfig.clearIdentityScope();
        siteSourceBeanDaoConfig.clearIdentityScope();
        siteSourceCategoryBeanDaoConfig.clearIdentityScope();
        siteSourceHomepageBeanDaoConfig.clearIdentityScope();
        authorBeanDaoConfig.clearIdentityScope();
        reviewBookBeanDaoConfig.clearIdentityScope();
    }

    public CategoryDetailBoDao getCategoryDetailBoDao() {
        return categoryDetailBoDao;
    }

    public CollectionMediaBeanDao getCollectionMediaBeanDao() {
        return collectionMediaBeanDao;
    }

    public CollectionMediaGroupBeanDao getCollectionMediaGroupBeanDao() {
        return collectionMediaGroupBeanDao;
    }

    public DownloadTaskBeanDao getDownloadTaskBeanDao() {
        return downloadTaskBeanDao;
    }

    public MediaChapterBeanDao getMediaChapterBeanDao() {
        return mediaChapterBeanDao;
    }

    public MediaRecordBeanDao getMediaRecordBeanDao() {
        return mediaRecordBeanDao;
    }

    public ReplaceRuleBeanDao getReplaceRuleBeanDao() {
        return replaceRuleBeanDao;
    }

    public SiteSourceBeanDao getSiteSourceBeanDao() {
        return siteSourceBeanDao;
    }

    public SiteSourceCategoryBeanDao getSiteSourceCategoryBeanDao() {
        return siteSourceCategoryBeanDao;
    }

    public SiteSourceHomepageBeanDao getSiteSourceHomepageBeanDao() {
        return siteSourceHomepageBeanDao;
    }

    public AuthorBeanDao getAuthorBeanDao() {
        return authorBeanDao;
    }

    public ReviewBookBeanDao getReviewBookBeanDao() {
        return reviewBookBeanDao;
    }

}
